<?php
$this->breadcrumbs=array(
	'Disciplinas'=>array('index'),
	'Administrar',
);

$this->menu=array(
	array('label'=>'Listar Disciplina', 'url'=>array('index')),
	array('label'=>'Criar Disciplina', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('disciplina-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Administrar Disciplinas</h1>

<?php echo CHtml::link('Pesquisa Avançada','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
    'id'=>'disciplina-grid',
    'dataProvider'=>$model->search(),
    'filter'=>$model,
    'columns'=>array(
            'ID_DISCIPLINA',
            'TX_DESCRICAO',
            array(
                    'class'=>'CButtonColumn',
            ),
    ),
    'pager'=>array(
            'header'=>''
        )
)); ?>
